package com.police.view;

import com.police.R;
import com.police.activity.MainActivity;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

/**
 * 鐐瑰嚮杞ㄨ抗鏃跺脊鍑�
 * @author yinxing
 *
 */
public class GuiJiView  extends LinearLayout {
	MainActivity main;
	public LinearLayout layout;
	LayoutInflater inflater;
	LayoutParams layoutParams;
	
	public TextView startTime;
	public TextView endTime;
	TimePop pop;
	public GuiJiView(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		main = (MainActivity) context;
		pop=new TimePop(context,null);
		initView();
	}
	private void initView() {
		inflater = LayoutInflater.from(main);
		layout = (LinearLayout) inflater.inflate(R.layout.guiji_view, null);
		layoutParams = new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.WRAP_CONTENT);
		
		this.addView(layout, layoutParams);
		startTime=(TextView)findViewById(R.id.time_start);
		endTime=(TextView)findViewById(R.id.time_end);
		startTime.setText(pop.date);
		
	}
    public String[] getTimes(){
       return  new String[]{startTime.getText().toString(),endTime.getText().toString()};
    }
}
